import { defineAsyncComponent } from 'vue'
import ErrorUnknown from '@/components/common/ErrorUnknown.vue'
import Loading from '@/components/common/Loading.vue'

export default function asyncCompWithLoading(loader) {
  return defineAsyncComponent({
    loader,
    loadingComponent: Loading,
    delay: 30,
    errorComponent: ErrorUnknown,
  })
}
